package com.sq.api;

import com.sq.entity.User;
import com.sq.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "登录")
@RestController
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
public class LoginApi {

    private final UserService userService;

    @Operation(summary = "登录")
    @GetMapping(value = "/login")
    public List<User> login(User user){
        return userService.list();
    }

}
